fafa7fab241d9b46030aa8459ca1eebe81c3760d,generator/src/main/java/org/allurefw/report/allure2/Allure2ResultsReader.java,Allure2ResultsReader,convert,#io.qameta.allure.model.Attachment#,182
Before Change
}
private Attachment convert(io.qameta.allure.model.Attachment attachment) {
return storage.findAttachmentByFileName(attachment.getSource())
.map(attach -> Objects.isNull(attachment.getType()) ? attach : attach.withType(attachment.getType()))
.map(attach -> Objects.isNull(attachment.getName()) ? attach : attach.withName(attachment.getName()))
.orElseGet(Attachment::new);
}
private Step convert(TestStepResult step) {
After Change
.withType(attach.getType())
.withSource(attach.getSource())
.withSize(attach.getSize()))
.orElseGet(() -> new Attachment().withName("unknown").withSize(0L).withType("*/*"));
if (Objects.nonNull(attachment.getType())) {
found.setType(attachment.getType());
}
if (Objects.nonNull(attachment.getName())) {
found.setName(attachment.getName());
}
return found;
}
private Step convert(TestStepResult step) {